﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace XRM.Security.DataAccess.Models
{
    [Table("Role")]
    public class Role
    {
        [Key]
        [DatabaseGenerated( DatabaseGeneratedOption.None )]
        public int Id { get; set; }

        [Required]
        [MaxLength( 50 )]
        public string Name { get; set; }

        [Required]
        [MaxLength( 256 )]
        public string Description { get; set; }

        public virtual ICollection<RoleMember> RoleMembers { get; set; }
    }
}
